<?php
namespace app\admin\controller;
use think\Controller;
use think\Db;
use think\Session;
class Login extends Controller {
    public function index(){
        return  view('login');
}
    public function vali(){
        $username=input('username');
        $password=input('password');
        $password_val=Db::name('user')->where('username',$username)->value('password');
        if (password_verify($password,$password_val)){
            Session::set('user','800li');
            return 'success';
        }else{
            return 'error';
        }
    }
}